package com.jiazhong.mingxing.boot.boot08.controller;

import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

//@CrossOrigin
@RestController
@RequestMapping("/boot08")
public class Boot08Controller {


    @GetMapping("/a")
    public String a(HttpServletResponse response) throws IOException {
        response.addHeader("Access-Control-Allow-Origin","*");
        return "This is Boot08`a method!";
    }
}
